# Document Library Configuration

Defines a document library template including columns, content types, views, folders, versioning, compliance, and alerts.

Referenced by: SiteCfg.DocumentLibrarySets, DocLib Set file handler.

# Overview

DocLibCfg defines properties for creating a document library: which columns and content types it contains, which views are available, versioning strategy, and alerts. It can also define folder structures and document sets.

Child configurations:

  • ViewCfg (list) — views with columns, filters, grouping (referenced via ViewSets)
  • FolderCfg (list) — folder structures (referenced via FolderSets)
  • DocumentSetCfg (list) — document set templates (referenced via DocumentSets)
  • PermissionSetCfg — permissions (referenced via PermissionSet)
  • PlannerCfg — Planner board (referenced via PlannerSet)
  • AlertCfg (list) — alerts for notifications
  • DoclibManagedNavigationCfg — managed navigation settings

# Applied when

The document library is created when:

  • The parent SiteCfg is provisioned and references this configuration via DocumentLibrarySets
  • OR the DocLib Set file handler references this configuration
  • Applied during site provisioning after the site is created; library-level properties (title, description, versioning, views, columns, content types, alerts, permissions) are applied immediately after library creation
  • All child configurations (views, folders, document sets, permissions, Planner boards) are applied hierarchically during library provisioning

# Core settings

# Name

Type: string | Required: Yes

Unique name for this library configuration. Referenced from SiteCfg.DocumentLibrarySets and used to create the actual SharePoint library.

Example: "Matters", "Contracts"

# Code

Type: string | Required: Yes

Code used in the library URL (the URL path segment). Must be unique within the site. No spaces or special characters.

Example: "matters", "contracts"

# Title

Type: string | Required: No

Display name of the library shown in the SharePoint UI. Falls back to Code if empty.

Example: "Matters and Cases", "Client Contracts"

# Description

Type: string | Required: No

Description of the library shown in SharePoint site contents and library settings.

# Content and structure

# Columns

Type: string (list) | Required: No

Names of ColumnCfg entries to add directly to this library. Use this for columns that belong to one library rather than to a content type shared across libraries. Columns are added after library creation and before its views are created, so a view can display them.

This is also the place to configure an autofill column: SharePoint supports Autofill on library columns only, not on site columns or content type columns.

A column listed here that is also a field of one of the library's ContentTypes is added once, not twice. Its settings and Autofill prompt are applied to the column that the content type brings into the library, so the document form and views show the filled values. This applies to libraries created from this version on; a library that already has a column twice keeps both.

Example: ["MatterCode", "ClientName", "MatterType"]

# ContentTypes

Type: string (list) | Required: No

Names of ContentTypeCfg entries to activate. Content types define which fields and templates are available to users.

Default: ["DMS Document", "DMS E-mail"]

Example: ["Matter", "Contract", "Correspondence"]

# ViewSets

Type: string (list) | Required: No

Names of ViewCfg entries to create. Views display filtered/grouped/sorted lists of library items.

Example: ["Active Matters", "By Client", "By Status"]

# FolderSets

Type: string (list) | Required: No

Names of FolderCfg entries to create folder structures. Use for complex hierarchies. For simple flat folders, use Folders.

Example: ["MattersFolder", "ContractsFolder"]

# DocumentSets

Type: string (list) | Required: No

Names of DocumentSetCfg entries to enable. Document sets are special folder templates containing predefined documents.

Example: ["MatterDocSet", "DealDocSet"]

# Folders

Type: string (list) | Required: No

Simple folder names to create at the library root. Use for flat folder structures. For complex hierarchies, use FolderSets instead.

Example: ["2024", "2025", "Archive"]

# Indexes

Type: string (list) | Required: No

Field names to create search indexes on. Indexing improves query performance for large libraries.

Example: ["MatterCode", "ClientName", "Status"]

# Behavioral settings

# NoCrawl

Type: bool | Required: No | Default: false

Exclude library from search index. When enabled, documents in this library are not searchable via SharePoint search. Useful for temporary or archived libraries.

# ExcludeFromOfflineClient

Type: bool | Required: No

Exclude from Outlook offline sync. When enabled, users cannot sync this library to Outlook offline.

# EnableFolderCreation

Type: bool | Required: No

Allow folder creation. When enabled, users can create new folders within the library. When disabled, folder structure is fixed.

# QuickLaunchAddToRoot

Type: bool | Required: No | Default: true

Add library link to Quick Launch navigation at root level. When enabled, the library appears in the site's Quick Launch menu.

# QuickLaunchAddToRecent

Type: bool? | Default: true | Required: No

Show recent items from this library in the Quick Launch menu.

# AlwaysCreateFolders

Type: bool | Required: No

Recreate folders when the library is updated. When enabled, folders specified in Folders or FolderSets are recreated during updates, even if manually deleted.

# CoPilot Agent

# CoPilotAgents

Type: string (list) | Default: — | Required: No

Names of CoPilotAgentDefinitionCfg entries to deploy as .agent files to the library root. Agent files are deployed when the library is first created.

Example: ["MatterAgent"]

See CoPilot Agent Configuration for full property reference.

# AlwaysDeployAgentFiles

Type: bool | Default: false | Required: No

Re-deploy agent files on every provisioning run, not only on first creation. When enabled, agent files are updated even if the library already exists.

# Versioning

# EnableVersions

Type: bool? | Default: true | Required: No

Enable version history. When enabled, SharePoint keeps previous versions of documents. When disabled, only the current version is kept.

# EnableMinorVersions

Type: bool? | Default: true | Required: No

Enable draft versions (minor versions). When enabled, users can save drafts before publishing major versions. When disabled, all versions are considered published.

Note: Only applies when EnableVersions is true.

# MajorVersionLimit

Type: int | Required: No

Number of major versions to keep. Older major versions are automatically deleted when this limit is exceeded. Leave empty for unlimited.

Example: 10 — Keep only the 10 most recent published versions.

# MajorWithMinorVersionsLimit

Type: int | Required: No

Number of draft versions per major version to keep. When exceeded, older drafts are deleted.

Example: 5 — Keep up to 5 drafts per published version.

Note: Only applies when EnableMinorVersions is true.

# DraftVersionVisibility

Type: enum | Required: No

Controls who can see draft versions. Valid values:

  • Reader — Only readers of the item can see drafts
  • Approver — Only item approvers can see drafts
  • Restricted — Only the author can see drafts

# ForceCheckout

Type: bool? | Default: false | Required: No

Require users to check out documents before editing. When enabled, users must check out a document, edit it, then check it back in (creating a new version). Prevents simultaneous edits.

# OneNote integration

# OneNoteCreateFile

Type: bool | Required: No | Configurator: "Create File"

Create a OneNote notebook in the library. When enabled, a new OneNote file is created during library provisioning according to OneNoteFileNameFormat.

# OneNoteFileNameFormat

Type: string | Required: No | Default: {MatterName} ({MatterCode}) | Configurator: "Filename Format"

OneNote notebook name pattern. Supports template variables:

  • {MatterCode} — Matter or project code
  • {MatterName} — Matter or project name

Example: "{MatterCode} - {MatterName} Notes" produces "M-2024-001 - Smith v. Jones Notes".

Note: Only applied when OneNoteCreateFile is true.

# OneNoteFilePermissionSet

Type: string | Required: No | Configurator: "PermissionSet"

Name of PermissionSetCfg to apply to the OneNote notebook. Allows different permissions on the notebook than the library itself.

Example: "MatterOwners"

# Compliance and retention

# ComplianceLabel

Type: string | Required: No | Configurator: "Label"

Retention/compliance label to apply to the library. Label must exist in your Microsoft Purview retention policies.

Example: "Legal Hold", "Client Confidential"

# ComplianceLabelBlockEdit

Type: bool | Required: No | Configurator: "Block Edit"

Block editing of labeled items. When enabled, documents with the compliance label cannot be edited.

# ComplianceLabelBlockDelete

Type: bool | Required: No | Configurator: "Block Delete"

Block deletion of labeled items. When enabled, documents with the compliance label cannot be deleted.

# DefaultSensitivityLabelName

Type: string | Required: No

Default sensitivity label for new documents uploaded to this library. Sensitivity labels control access and sharing permissions.

Example: "Internal Use Only", "Confidential", "Public"

# Security and access

# PermissionSet

Type: string | Required: No

Name of PermissionSetCfg to apply to this library. Defines who can access, edit, or delete documents.

Example: "Matters", "Clients"

# PlannerSet

Type: string | Required: No

Name of PlannerCfg for task management. Integrates a Microsoft Planner board with this library for task tracking.

Example: "DocumentApprovalTasks"

# Alerts

Type: AlertCfg (list) | Required: No

Alert definitions for email notifications. Users can subscribe to alerts when items are added, modified, or deleted.

# ContentTypesEnabled

Type: bool | Required: No | Configurator: "Allow management of content types"

Allow content type management. When enabled, users and administrators can manage content types in this library. When disabled, only your configured content types are used.

# EnableEnterpriseKeywords

Type: bool | Required: No

Enable enterprise keywords (managed metadata). When enabled, users can tag documents with keywords from your managed metadata service.

# ImportDefaultDocumentsFromUrl

Type: string | Required: No | Configurator: "ImportDefaultDocumentsFromUrl (relative)"

URL to import default documents from (relative path within the site). Used to populate the library with template documents during provisioning.

Example: "SharedDocuments/Templates" — Copies documents from the SharedDocuments/Templates folder into this library.

# Views and navigation

# ViewCfgs

Type: ViewCfg (list) | Required: No

View configurations. Alternative to ViewSets — allows inline view definitions. See View Configuration for details.

# ManagedNavigation

Type: DoclibManagedNavigationCfg | Required: No

Managed navigation configuration with hierarchy and filter fields. Enables navigation breadcrumbs and filter panel in modern list experience.

# ManagedNavigation.Enabled

Type: bool | Required: No

Enable managed navigation for this library. When enabled, users see navigation breadcrumbs and filter panel in modern list experience.

# ManagedNavigation.HierachyFields

Type: string (list) | Required: No

Field names (title or internal name) to show in the navigation hierarchy. Creates a breadcrumb trail based on field values.

Example: ["DocType", "Status"] — Shows documents grouped by DocType, then Status.

Note: Typo in property name (HierachyFields → should be HierarchyFields); use exact spelling as shown.

# ManagedNavigation.FilterFields

Type: string (list) | Required: No

Field names (title or internal name) to show in the filter panel. Users can filter library items by these fields.

Example: ["Status", "Owner", "Priority"] — Adds filter controls for Status, Owner, and Priority.

# Modern list experience

# ListExperience

Type: enum | Required: No | Applies When: SharePoint 2019+, SharePoint Online, or modern on-premises (not supported on SharePoint 2013/2016)

List experience preference. Valid values:

  • Auto — Use SharePoint default (typically modern for SharePoint Online)
  • ClassicExperience — Force classic (traditional) list view
  • ModernListExperience — Force modern responsive list view

Note: This setting is ignored on SharePoint 2013 and 2016.

# Classic edit form

Type: string (list) | Required: No | Default: empty

Script URLs added to the JSLink of the library's classic edit form, so that Edit properties on a document opens the Epona edit form instead of the standard SharePoint form. Libraries without this setting are not changed.

Example: ["~sitecollection/Style Library/Epona/formTemplate.js"]. Adds the Epona form script to the library's edit form.

Provisioning checks the edit form on every run and adds only the entries that are missing. Scripts that are already there, including ones added by hand, are kept and never added twice.

Notes:

  • Classic experience only. The modern Edit properties panel ignores JSLink. On SharePoint Online, set ListExperience to ClassicExperience. ListExperience is applied only when the library is created. To use this setting on an existing library, switch that library to the classic experience by hand.
  • Temporary. This setting stops working once Microsoft retires the classic edit form.
  • Entries are used as written. Placeholders such as {MatterCode} are not replaced, but SharePoint's own ~sitecollection/ and ~site/ tokens work.
  • Script files are not deployed. The files must already exist at the configured URLs. With ~sitecollection/, they must exist in every matter site collection.
  • Custom scripts. On SharePoint Online sites that block custom scripts, provisioning allows them for a moment to add the scripts, then blocks them again. This needs a provisioning account with SharePoint admin rights. Allowing and blocking custom scripts takes a few seconds each time and is repeated for every library that needs the form, so creating a matter with several such libraries is noticeably slower. Runs where the form is already in place are not slowed down. On tenants with Baseline Security Mode, custom scripts cannot be allowed, and the form cannot be added at all.
  • Errors never stop provisioning. If the scripts cannot be added, the matter is still created and a warning is logged.
Last Updated: 11/11/2026, 10:31:06 AM